<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">  
<h:head>
<meta charset="utf-8"></meta>
<link rel="stylesheet" href="css/reset.css" type="text/css" media="all"></link>
<link rel="stylesheet" href="css/layout.css" type="text/css" media="all"></link>
<link rel="stylesheet" href="css/style.css" type="text/css" media="all"></link>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/cufon-replace.js"></script>
<script type="text/javascript" src="js/Molengo_400.font.js"></script>
<script type="text/javascript" src="js/Expletus_Sans_400.font.js"></script>
</h:head>

<h:body id="page1">
	<div class="body1">
		<div class="main">
                    <header>
				<div class="wrapper">
					<nav>
						<ul id="menu">
							<li><a href="Index.xhtml">About</a></li>
							<li><a href="ReportProblem.xhtml">Report a problem</a></li>
							<li><a href="ReportedProblems.xhtml">Reported problems</a></li>
							<li class="end"><a href="LogIn.xhtml">Log in</a></li>
						</ul>
					</nav>
				</div>
				<div class="wrapper">
					<h1><a href="index.html" id="logo">Fix It</a></h1>
				</div>
				<div id="slogan">
					Improve your city!
				</div>
                    </header>
		</div>
	</div>

	<div class="body2">
		<div class="main">
<!-- content -->
			<section id="content">
				<div class="box1">
					<div class="wrapper">
						<article class="col1">
							<div class="pad_left1">
								<h2>Report Problem</h2>
								<h:form id="ContactForm">
                        						<div>
										<div class="wrapper">
											<strong style="width:100px;">Name:</strong>                                                                                        
                                                                                        <div class="bg">
                                                                                            <p:inputText id="firstname" style="width:200px;" value="#{reportProblemIndexPresenter.name}" required="true">
                                                                                                <f:validateLength minimum="5" />
                                                                                            </p:inputText>
                                                                                            <p:message for="firstname" display="icon"/> 
                                                                                        </div>
										</div>
										<div  class="wrapper">
                                                                                    <strong style="width:100px;">Importance:</strong>
                                                                                        <div class="bg">
                                                                                                <p:spinner id="spnImportance" value="#{sliderBean.importance}" min="1" max="5" /> 
                                                                                        </div>
                                                                                 
                                                                                </div>
                                                                                <div  class="wrapper">
                                                                                        <strong style="width:100px;">Municipality:</strong>
                                                                                        <div class="bg">
                                                                                            <h:selectOneMenu value="#{reportProblemIndexPresenter.municipality}" style="width: 210px;" converter="#{mConverterBean}">
                                                                                                <f:selectItems value="#{reportProblemIndexPresenter.municipalities}" var="c" itemLabel="#{c.name}" itemValue="#{c}" />
                                                                                            </h:selectOneMenu>
                                                                                           
                                                                                        </div>
                                                                               </div>
                                                                            <div  class="wrapper">
                                                                                        <strong style="width:100px;">Street:</strong>
                                                                                        <div class="bg">
                                                                                            <h:selectOneMenu value="#{reportProblemIndexPresenter.street}" style="width: 210px;" converter="#{streetConverterBean}">
                                                                                                <f:selectItems value="#{reportProblemIndexPresenter.streets}" var="c" itemLabel="#{c.name}" itemValue="#{c}" />
                                                                                            </h:selectOneMenu>                                                                                           
                                                                                        </div>
                                                                               </div>
                                                                            <div  class="wrapper">
                                                                                        <strong style="width:100px;">User:</strong>
                                                                                        <div class="bg">
                                                                                            <h:selectOneMenu value="#{reportProblemIndexPresenter.user}" style="width: 210px;" converter="#{userConverterBean}">
                                                                                                <f:selectItems value="#{reportProblemIndexPresenter.users}" var="c" itemLabel="#{c.username}" itemValue="#{c}" />
                                                                                            </h:selectOneMenu>                                                                                           
                                                                                        </div>
                                                                             </div>
                                                                            <div  class="wrapper">
                                                                                        <strong style="width:100px;">Authority:</strong>
                                                                                        <div class="bg">
                                                                                            <h:selectOneMenu value="#{reportProblemIndexPresenter.authority}" style="width: 210px;" converter="#{authorityConverterBean}">
                                                                                                <f:selectItems value="#{reportProblemIndexPresenter.authorities}" var="c" itemLabel="#{c.name}" itemValue="#{c}" />
                                                                                            </h:selectOneMenu>                                                                                           
                                                                                        </div>
                                                                             </div>
                                                                            <div  class="wrapper">
                                                                                        <strong style="width:100px;">Problem type:</strong>
                                                                                        <div class="bg">
                                                                                            <h:selectOneMenu value="#{reportProblemIndexPresenter.problemType}" style="width: 210px;" converter="#{problemTypeConverterBean}">
                                                                                                <f:selectItems value="#{reportProblemIndexPresenter.problemTypes}" var="c" itemLabel="#{c.description}" itemValue="#{c}" />
                                                                                            </h:selectOneMenu>                                                                                           
                                                                                        </div>
                                                                             </div>
<!--                                                                            <div  class="wrapper">
                                                                                        <strong style="width:100px;">Date:</strong>
                                                                                        <div class="bg">
                                                                                            <p:inputText style="width:200px;" value="#{reportProblemIndexPresenter.date}"/>                                                                                           
                                                                                        </div>
                                                                             </div>-->
                                                                            <h:commandButton class="button" style="width:200px;" value="Save" action="#{reportProblemIndexPresenter.action}"></h:commandButton>
									</div>
								</h:form>
							</div>
						</article>
						<article class="col2 pad_left2">
							<div class="pad_left1">
                                                                    <h2>Some <span>Info</span></h2>
								<p>FIX it is a JAVA web based application that allows users to report problems related to the infrastructure of the municipality they live in and with that help the authorities to solve the problems faster and more efficiently.
Users (with or without a user account) can report problems using a very simple form and choose between reporting a problem related to a parking place, graffiti, ruined street or garbage in every municipality in Ljubljana.</p>
							</div>
						</article>
					</div>
				</div>
			</section>
<!-- content -->
		</div>
	</div>
<script type="text/javascript"> Cufon.now(); </script>
</h:body>
</html>
